package com.cuitrip.util;

import java.util.Locale;

/**
 * Created by MiJack on 2016/1/7.
 */
public enum CtLocale {
    DEFAULT, SIMPLIFIED_CHINESE, TRADITIONAL_CHINESE, ENGLISH;

    public static CtLocale valueOf(Locale locale) {
        if (locale.equals(Locale.SIMPLIFIED_CHINESE)) {
            return SIMPLIFIED_CHINESE;
        } else if (locale.equals(Locale.TRADITIONAL_CHINESE)) {
            return TRADITIONAL_CHINESE;
        } else if (locale.equals(Locale.ENGLISH)) {
            return ENGLISH;
        }
        return DEFAULT;
    }
}
